package com.serializable;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

/**
 * @Auther: csh
 * @Date: 2020/10/19 16:10
 * @Description:反序列化
 */
public class ReadObject {

    public static void main(String[] args) {
        try {
            ObjectInputStream ois =new ObjectInputStream(new FileInputStream("object.txt"));
            Person person  =(Person)ois.readObject();
            System.out.println(person);
        }catch (Exception e){
            e.printStackTrace();
        }
    }

}
